<?php   if ( ! defined('BASEPATH')) exit('No direct script access allowed');

if ( ! function_exists('ResultToArray'))
{
    function ResultToArray($array)
    {
        $res = array();
        foreach ($array as $ar)
        {
            $res[$ar->id] = $ar->name;
        }
        return $res;
    }
}